FROM cubedhost/centos7-dind-node
MAINTAINER deng

# ssh
#RUN yum -y update&&yum -y install passwd openssl openssh-server  openssh-clients
#RUN mkdir -p /var/run/sshd/
#RUN  sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config
#RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
#RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ecdsa_key
#RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ed25519_key
#EXPOSE 22


# docker
COPY daemon.json /etc/docker/daemon.json
COPY docker-compose /usr/local/bin/docker-compose
RUN chmod 755 /usr/local/bin/docker-compose





#go
COPY go1.15.7.linux-amd64.tar.gz go.tar.gz
RUN tar --remove-files -C /usr/local/ -zxf go.tar.gz
RUN ln -sv /usr/local/go/bin/go /bin
RUN mkdir -p /home/data/go
ENV GOROOT /usr/local/go
ENV GOPATH /home/data/gopath


#fabric sample files
ADD fabric-assert.tar /home/fabric

#docker images
ADD docker.tar /var/lib/

RUN echo "123456" | passwd --stdin root


ADD run.sh /run.sh
RUN chmod 755 /run.sh
WORKDIR /home/fabric/fabric-assert

ADD start-service.sh /start-service.sh

RUN chmod 755 /start-service.sh


ENTRYPOINT ["/run.sh"]
CMD []

